<?php

namespace Gnway\Ticket\Rest\Annotation\Parser;

use Doctrine\Common\Annotations\AnnotationReader;
use Gnway\Ticket\Rest\Container\RestContainer;
use ReflectionException;

abstract class AbstractParser
{

  /**
   * Annotation reader
   *
   * @var AnnotationReader
   */
  protected AnnotationReader $reader;

  /**
   * Parser constructor.
   *
   * @throws ReflectionException
   */
  public function __construct()
  {
    $this->reader = RestContainer::make(AnnotationReader::class);
  }

  /**
   * Parse object
   *
   * @return array
   */
  abstract public function parse(): array;
}